<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<meta http-equiv="Cache-Control" content="No-Cache">
	<meta http-equiv="Pragma" content="No-Cache">
	<title>운세의 신</title>
	<link rel="stylesheet" type="text/css" href="/css/common.css">
	<link rel="stylesheet" type="text/css" href="/css/sub.css">
	<link href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
	<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
	<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery-ui.min.js"></script>
	<script src="/js/lib/myconfig.jquery.datepicker.js" type="text/javascript"></script>
	<script type="text/javascript">
		$(document).ready(function() {
			// 달력
			$("#today").datepicker();
			$("img.ui-datepicker-trigger").attr("style","margin-left:5px; vertical-align:middle; cursor:pointer;"); //이미지버튼 style적용
			$("#ui-datepicker-div").hide(); //자동으로 생성되는 div객체 숨김

			// 달력으로 날짜 선택
			$("#today").change(function() {
				location.href='/unse/star/total/main?target_date='+this.value;
			});
			
			$(".today .pre").click(function() {
				location.href='/unse/star/total/main?target_date=<?=$yesterday?>';
			});
			
			$(".today .next").click(function() {
				location.href='/unse/star/total/main?target_date=<?=$tomorrow?>';
			});
			
			$(".t_star1 ul li:first").addClass('first');
			$(".t_star1 ul li:last").addClass('end');
			
			// 추천 스타이름 클릭시
			$(".bn_s li a").each(function(index) {
				$(this).click(function() {
					$("#search_keyword").val($(this).text());
					$("#frm_search").submit();
				});
			});
			
		}); 

<?	if ($sess_userinfo['login_yn'] == 'Y') : ?>
		function result(idx, user_name, sex, birth_yyyy, birth_mm, birth_dd) {
			//alert(user_name+','+sex+','+birth_yyyy+','+birth_mm+','+birth_dd);
			$("#frm #idx").val(idx);
			$("#frm #user_name").val(user_name);
			$("#frm #sex").val(sex);
			$("#frm #birth_yyyy").val(birth_yyyy);
			$("#frm #birth_mm").val(birth_mm);
			$("#frm #birth_dd").val(birth_dd);
			$("#frm").submit();
		}

		// 스타 궁합 페이지로 이동
		function gunghap(idx, your_name, your_sex, your_birth_yyyy, your_birth_mm, your_birth_dd) {
			$("#frm_gunghap #artist_idx").val(idx);
			$("#frm_gunghap #your_name").val(your_name);
			$("#frm_gunghap #your_sex").val(your_sex);
			$("#frm_gunghap #your_birth_yyyy").val(your_birth_yyyy);
			$("#frm_gunghap #your_birth_mm").val(your_birth_mm);
			$("#frm_gunghap #your_birth_dd").val(your_birth_dd);
			$("#frm_gunghap").submit();
		}
<?	else : ?>
		function result(idx, user_name, sex, birth_yyyy, birth_mm, birth_dd) {
			alert('로그인 후 이용가능합니다.');
		}

		// 스타 궁합 페이지로 이동
		function gunghap(your_name, your_sex, your_birth_yyyy, your_birth_mm, your_birth_dd) {
			alert('로그인 후 이용가능합니다.');
		}
<?	endif ?>
	</script>
</head>
<body>
<form name="frm" id="frm" method="post" action="/unse/star/todaybirth/result">
	<input type="hidden" name="target_yyyy" id="target_yyyy" value="<?=date("Y",time());?>"  />
	<input type="hidden" name="idx" id="idx" value="" />
	<input type="hidden" name="user_name" id="user_name" value="" />
	<input type="hidden" name="sex" id="sex" />
	<input type="hidden" name="birth_yyyy" id="birth_yyyy" />
	<input type="hidden" name="birth_mm" id="birth_mm" />
	<input type="hidden" name="birth_dd" id="birth_dd" />
	<input type="hidden" name="birth_hh" id="birth_hh" value="0" />
	<input type="hidden" name="birth_solunar" id="birth_solunar" value="S_C" />
</form>
<form name="frm_gunghap" id="frm_gunghap" method="post" action="/unse/star/gunghap/form">
	<input type="hidden" name="artist_idx" id="artist_idx" />
	<input type="hidden" name="your_name" id="your_name" />
	<input type="hidden" name="your_sex" id="your_sex" />
	<input type="hidden" name="your_birth_yyyy" id="your_birth_yyyy" />
	<input type="hidden" name="your_birth_mm" id="your_birth_mm" />
	<input type="hidden" name="your_birth_dd" id="your_birth_dd" />
</form>
<div id="wrap"> 
	<!-- Header -->
	<? include_once $_SERVER['DOCUMENT_ROOT'].'/include/commons/main_header.php'; ?>
	<!--// Header --> 
	
	<!--커튼 데코레이션-->
	<? include_once $_SERVER['DOCUMENT_ROOT'].'/include/commons/drape.php'; ?>
	<!--//커튼 데코레이션--> 
		
		<!--컨텐츠-->
		<div id="content"> 
			<!--나의 정보 /배너/실시간 운세차트-->
			<div class="keybox"> 
				<!--나의정보--> 
				<?php echo $INC_MEMBER; ?> 
				<!--//나의정보--> 
				
				<!--키배너-->
				<div class="key_bn"><span><img src="/images/sub/star/key_v1.jpg" /></span></div>
				<!--//키배너--> 
				
				<!--실시간 운세차트-->
				<? include_once $_SERVER['DOCUMENT_ROOT'].'/include/static/unse_chart.php'; ?>
				<!--//실시간운세차트--> 
			</div>
			<!--나의 정보 /배너/실시간 운세차트--> 
		
			<!--왼쪽 컨텐츠-->
			<div class="assistant"> 
				<!--왼쪽 메뉴-->
				<? include_once $_SERVER['DOCUMENT_ROOT'].'/include/commons/inc_lnb.php'; ?>
				<!--// 왼쪽 메뉴--> 
				
				<!--추천테마-->
				<? include_once $_SERVER['DOCUMENT_ROOT'].'/include/static/theme.php'; ?>
				<!--//추천테마--> 
				
				<!--오늘의 추천! 무료운세-->
				<? include_once $_SERVER['DOCUMENT_ROOT'].'/include/static/free.php'; ?>
				<!--//오늘의 추천! 무료운세--> 
				
				<!--회원배너-->
				<? include_once $_SERVER['DOCUMENT_ROOT'].'/include/static/member_join.php'; ?>
				<!--//회원배너-->
			</div>
			<!--//왼쪽 컨텐츠--> 
		
			<!-- 메인컨텐츠-->
			<div class="cont"> 
				<!--컨텐츠배너-->
				<p><a href="#"><img src="/images/sub/star/bn_star.png" /></a></p>
				<!--//컨텐츠배너--> 
				
				<!--스타컨텐츠-->
				<div class="cont_bx">
					<div class="today_bx"> 
						<!--달력-->
						<div class="today"> <a href="javascript:;" class="pre">이전</a> <img src="/images/common/day/day_<?=substr($today, 0,1)?>.png" align="absmiddle" alt="년도" /><img src="/images/common/day/day_<?=substr($today, 1,1)?>.png" align="absmiddle" alt="년도" /><img src="/images/common/day/day_<?=substr($today, 2,1)?>.png" align="absmiddle" alt="년도" /><img src="/images/common/day/day_<?=substr($today, 3,1)?>.png" align="absmiddle" alt="년도" /><img src="/images/common/day/day_dot.png" align="absmiddle" alt="점" /><img src="/images/common/day/day_<?=substr($today, 5,1)?>.png" align="absmiddle" alt="월" /><img src="/images/common/day/day_<?=substr($today, 6,1)?>.png" align="absmiddle" alt="월" /><img src="/images/common/day/day_dot.png" align="absmiddle" alt="점" /><img src="/images/common/day/day_<?=substr($today, 8,1)?>.png" align="absmiddle" alt="월" /><img src="/images/common/day/day_<?=substr($today, 9,1)?>.png" align="absmiddle" alt="월" /><img src="/images/common/day/day_dot.png" align="absmiddle" alt="점" />
							<input type="hidden" name="today" id="today" value="<?=$today?>" />
							<a href="javascript:;" class="next">다음</a>
						</div>
					<!--//달력-->
					</div>
				<?	if ($today == date('Y-m-d',time())) : ?>
				<!--스타리스트-->
				<?
	$MAX_SIZE = 30;
	$COL_SIZE = 3;
	$total_cnt =  count($today_artist_list) < 6 ? count($today_artist_list) : 6;

	for ($i=0; $i < $total_cnt; $i++) { 
		if ($MAX_SIZE == $i) break;
		$item = $today_artist_list[$i];
		if ($i == 0 || $i%$COL_SIZE == 0) { ?>
		
				<div class="t_star">
					<ul>
						<?		} ?>
						<li>
							<dl>
								<span class="img"><img src="<?=$item['photo']?>" /></span>
								<dt><?=$item['artist_name']?></dt>
								<dd><?=$item['birth_yyyy'] ?>년 <?=$item['birth_mm'] ?>월 <?=$item['birth_dd'] ?>일</dd>
								<dd><?=$item['job']?></dd>
								<dd><?=$item['body']?></dd>
							</dl>
							<p class="btn"><a href="javascript:;" onclick="result('<?=$item['idx']?>','<?=$item['artist_name']?>','<?=$item['sex']?>','<?=$item['birth_yyyy']?>','<?=$item['birth_mm']?>','<?=$item['birth_dd']?>');"><img src="/images/sub/star/btn_view_01.png" alt="운세보기"></a><a href="javascript:;" onclick="gunghap('<?=$item['idx']?>','<?=$item['artist_name']?>','<?=$item['sex']?>','<?=$item['birth_yyyy']?>','<?=$item['birth_mm']?>','<?=$item['birth_dd']?>');"><img src="/images/sub/star/btn_view_02.png" alt="매칭하기"></a></p>
						</li>
						<?		if (($i+1)%$COL_SIZE == 0 || ($i+1) == $total_cnt) { ?>
					</ul>
				</div>
				<?		} ?>
				<?	} ?>
				<!--//스타리스트-->
				<?	else : ?>
				<!--지난날 스타 리스트-->
				<?
	$MAX_SIZE = 30;
	$COL_SIZE = 3;
	$total_cnt =  count($today_artist_list) < 6 ? count($today_artist_list) : 6;

	for ($i=0; $i < $total_cnt; $i++) { 
		if ($MAX_SIZE == $i) break;
		$item = $today_artist_list[$i];
		if ($i == 0 || $i%$COL_SIZE == 0) { ?>
				<div class="star_list">
						<ul>
						<?		} ?>
						<li>
								<dl>
								<dt><img src="/images/common/icon_star/icon_<?=$item['job_icon']?>.png" alt="아이콘" /><em><?=$item['artist_name']?></em></dt>
								<dd><em>생년월일</em><?=$item['birth_yyyy'] ?>년<?=$item['birth_mm'] ?>월<?=$item['birth_dd'] ?>일</dd>
								<dd><em>직업</em><?=$item['job']?></dd>
								<dd><em>신체사이즈</em><?=$item['body']?></dd>
								<dd><a href="javascript:;" onclick="result('<?=$item['idx']?>','<?=$item['artist_name']?>','<?=$item['sex']?>','<?=$item['birth_yyyy']?>','<?=$item['birth_mm']?>','<?=$item['birth_dd']?>');"><img src="/images/common/btn_unse.gif" alt="운세보기"></a><a href="javascript:;" onclick="gunghap('<?=$item['idx']?>','<?=$item['artist_name']?>','<?=$item['sex']?>','<?=$item['birth_yyyy']?>','<?=$item['birth_mm']?>','<?=$item['birth_dd']?>');"><img src="/images/common/btn_conect.gif" alt="매칭하기"></a></dd>
							</dl>
							</li>
						<?		if (($i+1)%$COL_SIZE == 0 || ($i+1) == $total_cnt) { ?>
					</ul>
					</div>
				<?		} ?>
				<?	} ?>
				<!--//지난날 스타 리스트-->
				<?	endif ?>
				<!--사진저작권경고문고-->
				<div class="pic_text">
							<span class="pict_text">사진은 저작권 문제로 생일을 맞은 연예인의 사진만 임시적으로 게재함을 양해해주시기 바랍니다. 본 사진의 저작권은 해당 저작권자에게 있습니다.</span>
					</div>
			 <!--//사진저작권경고문고-->
				<!--스타궁합-->
				<div class="c_star">
						<a name="search"></a> 
						<!--배너-->
						<p><img src="/images/sub/star/bn_star1.png" /></p>
						<!--//배너--> 
						
						<!--스타검색-->
						<div class="search">
						<h4><img src="/images/sub/star/tit_search.gif" /></h4>
						<form name="frm_search" id="frm_search" method="post" action="/unse/star/total/main#search">
								<fieldset>
								<span>
									<input type="text" name="search_keyword" id="search_keyword" value="<?=$search_keyword?>">
									</span>
								<button title="검색" type="submit" ></button>
								<!--오토 스타-->
								<ul class="bn_s">
										<li><a href="javascript:;">김수현</a></li>
										<li>/</li>
										<li><a href="javascript:;">김태희</a></li>
										<li>/</li>
										<li><a href="javascript:;">장동건</a></li>
										<li>/</li>
										<li><a href="javascript:;">한지민</a></li>
										<li>/</li>
										<li><a href="javascript:;">재범</a></li>
										<li>/</li>
										<li><a href="javascript:;">수지</a></li>
									</ul>
								<!--//오토 스타-->
							</fieldset>
							</form>
					</div>
						<!--//스타검색--> 
						
						<!--스타리스트-->
						<div class="t_star1">
						<?	if (!empty($artist_list)) : ?>
						<!--최대 5개까지 리스트 노출 첫번째 li 에는 클래스first 나와야 합니다. -->
						<ul>
								<?		foreach ($artist_list as $item) : ?>
								<li> <span class="img"><img src="<?=$item['photo']?>" /></span> <span>
									<?=$item['artist_name']?>
									<em>
								<?=$item['job']?>
								</em></span> <span><a href="javascript:;" onclick="gunghap('<?=$item['idx']?>','<?=$item['artist_name']?>','<?=$item['sex']?>','<?=$item['birth_yyyy']?>','<?=$item['birth_mm']?>','<?=$item['birth_dd']?>');"><img src="/images/main/btn_conect.gif" alt="매칭하기"></a></span> </li>
								<?		endforeach	?>
							</ul>
						<!--//최대 5개까지 리스트 노출 -->
						<?	elseif (!empty($search_keyword)) :	?>
						<p>검색된 결과가 없습니다.</p>
						<?	else :	?>
						<!--검색 하기 전의 타이틀 -->
						<p>스타의 이름을 검색하고 궁합을 보세요.</p>
						<!--//검색 하기 전의 타이틀 -->
						<?	endif	?>
					</div>
						<!--//스타궁합--> 
						
						<!--서비스공지사항-->
						<? // include_once $_SERVER['DOCUMENT_ROOT'].'/include/unse/price_notice.php'; ?>
						<!--//서비스공지사항--> 
					</div>
				<!--//스타궁합--> 
			</div>
				<!--//스타컨텐츠--> 
				<!--하단컨텐츠-->
				<div class="assistant3"> 
				<!--함께보면좋은 운세-->
				<div class="left">
					<? include_once $_SERVER['DOCUMENT_ROOT'].'/include/static/together.php'; ?>
				</div>
				<!--//함께보면좋은 운세--> 
				<!--후기게시판-->
				<div class="right">
					<!--후기게시판 최근 게시물 리스트 (views/inc/postscript_list_v.php)-->
					<?php echo $INC_POSTSCRIPT_LIST ?>
					<!--//후기게시판 최근 게시물 리스트 -->
				</div>
				<!--//후기게시판--> 
				
			</div>
			<!--//하단컨텐츠--> 
		</div>
		<!--// 메인컨텐츠--> 
		
		<!--서비스배너-->
		<? include_once $_SERVER['DOCUMENT_ROOT'].'/include/static/bn_service.php'; ?>
		<!--//서비스배너--> 
		</div>
		<!--컨텐츠--> 
		
		<!-- Footer -->
		<? include_once $_SERVER['DOCUMENT_ROOT'].'/include/commons/main_footer.php'; ?>
		<!--// Footer --> 
	</div>
<script language="javascript" src="http://ad1.sportschosun.com/js.kti/szo/unsin@star"></script>
</body>
</html>